package com.example.jstlweb.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
public class TestController {

    @Value("${server.port}")
    private String port;
    @RequestMapping("test")
    public String test(Model model,String name){
        System.err.println(port);
        model.addAttribute("port",port);
        model.addAttribute("rpc",name+"");
        return "index";
    }

}
